import BH3MysApi from "./mysApi.js"
import base from "./base.js"
import mysCfg from "./mysCfg.js"
export default class characters extends base {
  constructor(e) {
    super(e)
    this.model = "characters"
  }

  async getData(e) {
    let { uid, ck, game_biz, region } = await mysCfg.othergame(e)
    let mysApi = new BH3MysApi(uid, ck, { game: "bh3" }, region, game_biz)
    let device_fp = await mysApi.getData("getFp")
    let headers = { "x-rpc-device_fp": device_fp?.data?.device_fp }
    let res = await mysApi.getBH3ApiData("characters", { headers })
    let data = res.data
    return { ...this.screenData, data }
  }
}
